package fr.uniscol.siecle.model;

import java.io.Serializable;

public class Matiere implements Serializable, DonneeSiecle {
	
	private String code = null;
	
	private String codeGestion = null;
	
	private String libelleCourt = null;
	
	private String libelleLong = null;
	
	private String libelleEdition = null;
	
	private int etp = 0;

	public Matiere() {
		super();
	}

	public Matiere(String code, String codeGestion) {
		super();
		this.code = code;
		this.codeGestion = codeGestion;
	}

	public String getCode() {
		if(code == null){
			code = "";
		}
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCodeGestion() {
		if(codeGestion == null){
			codeGestion = "";
		}
		return codeGestion;
	}

	public void setCodeGestion(String codeGestion) {
		this.codeGestion = codeGestion;
	}

	public String getLibelleCourt() {
		if(libelleCourt == null){
			libelleCourt = "";
		}
		return libelleCourt;
	}

	public void setLibelleCourt(String libelleCourt) {
		this.libelleCourt = libelleCourt;
	}

	public String getLibelleLong() {
		if(libelleLong == null){
			libelleLong = "";
		}
		return libelleLong;
	}

	public void setLibelleLong(String libelleLong) {
		this.libelleLong = libelleLong;
	}

	public String getLibelleEdition() {
		if(libelleEdition == null){
			libelleEdition = "";
		}
		return libelleEdition;
	}

	public void setLibelleEdition(String libelleEdition) {
		this.libelleEdition = libelleEdition;
	}

	public int getEtp() {
		return etp;
	}

	public void setEtp(int etp) {
		this.etp = etp;
	}

	@Override
	public boolean equals(Object obj) {
		Matiere m = (Matiere)obj;
		return getCode().equals(m.getCode());
	}
}
